package Exercises;

import java.util.Scanner;

public class Task10 {

	public static void main(String[] args) {

		Scanner sc = new Scanner (System.in);

		int c = 0;
		
		while(true)
		{
			System.out.println("Please add a number: ");
			int n = sc.nextInt();
		if(n<0)
		{
			c++;
		}
			
		if (n==0)
		{
			break;
		}
				
		}
		
		System.out.println("You added " + c + " negative numbers");
		
		
		
		
	}

}
